import request from '@/utils/request';
import { stringify } from 'qs';
export default {
    addOneGoodsToOrder(payload) {
        return request({
            url: `/api/addOneGoodsToOrder?${stringify(payload)}`,
            method: 'post'
        })
    },
    addGoodsToOrderByShopId(payload) {
        return request({
            url: `/api/addGoodsToOrderByShopId?user_id=${payload.user_id}&shop_id=${payload.shop_id}&goods_idList=${payload.goods_idList}&total_money=${payload.total_money}`,
            method: 'post'
        })
    },
    getOrderInfo(payload) {
        return request({
            url: `/api/getOrderInfo?${stringify(payload)}`,
            method: 'get'
        })
    },
    payForOrder(payload) {
        return request({
            url: `/api/payForOrder?user_id=${payload.user_id}&order_idList=${payload.order_idList}&order_totalMoney=${payload.order_totalMoney}`,
            method: 'put'
        })
    },
    payForOrderById(payload){
        return request({
            url: `/api/payForOrderById?user_id=${payload.user_id}&order_id=${payload.order_id}&order_totalMoney=${payload.order_totalMoney}&time=${payload.time}`,
            method: 'put'
        })
    },
    getGoodsFile(payload) {
        return request({
            url: `/api/getGoodsFile?${stringify(payload)}`,
            method: 'get'
        })
    },
    getAllOrderInfo(payload) {
        return request({
            url: `/api/getAllOrderInfo?${stringify(payload)}`,
            method: 'get'
        })
    },
    addEvaluation(payload) {
        return request({
            url: `/api/addEvaluation`,
            method: 'post',
            data: payload
        })
    },
    EvaluationDetail(payload) {
        return request({
            url: `/api/EvaluationDetail${payload}`,
            method: 'get',
        })
    },
    deleteOrderInfo(payload) {
        return request({
            url: `/api/deleteOrderInfo?${stringify(payload)}`,
            method: 'delete'
        })
    },
    EvaluationDetailByOrder(payload) {
        return request({
            url: `/api/eva/EvaluationDetailByOrder?${stringify(payload)}`,
            method: 'get'
        })
    },
};